package com.yvon.core.result;

public class GlobalException extends RuntimeException {
    private static final long serialVersionUID = -7996556093413097167L;
    private Integer code;
    private String msg;

    public Integer getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    public GlobalException(String msg) {
        super(msg);
        this.code = ResultCode.GLOBAL_EXCEPTION.getCode();
    }

    public GlobalException(Integer code, String msg) {
        super(msg);
        this.code = ResultCode.GLOBAL_EXCEPTION.getCode();
        this.code = code;
        this.msg = msg;
    }
}